﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>用户列表</title>
		<link rel="stylesheet" type="text/css" href="../../js/jquery-easyui-1.3.1/themes/icon.css"/>
        <link rel="stylesheet" type="text/css" href="../../js/jquery-easyui-1.3.1/themes/default/easyui.css"/>
        <script type="text/javascript" src="../../js/jquery-easyui-1.3.1/jquery-1.8.0.min.js"></script>
        <script type="text/javascript" src="../../js/jquery-easyui-1.3.1/jquery.easyui.min.js"></script>
        <script type="text/javascript" src="../../js/jquery-easyui-1.3.1/locale/easyui-lang-zh_CN.js"></script>
        <script type="text/javascript">
        	$(function(){
        		$('#usergrid').datagrid({
        			singleSelect:true,
        			url:'../../alluser.do',
        			fit: true,
        			border: false,
        			rownumbers: true,
        			pagination: true,
    				columns:[[
    							{field:'name',title:'用户姓名',width:150,align:'center'},
    							{field:'sex',title:'性别',width:150,align:'center'},
    							{field:'depart',title:'用户单位',width:150,align:'center'},
    							{field:'level',title:'用户类别',width:150,align:'center'},
    							{field:'role',title:'用户角色',width:150,align:'center'},
    							{field:'depart',title:'用户状态',width:150,align:'center'}
    						]],
        			toolbar:[{
    					text:'添加',
    					iconCls:'icon-add',
    					handler:function(){
    						$('#dialog').dialog("open").dialog("setTitle", "新增用户")
    					}
    				},'-',{
    					text:'删除',
    					iconCls:'icon-remove',
    					handler:function(){
    						
    					}
    				},'-',{
    					text:'修改信息',
    					iconCls:'icon-edit',
    					handler:function(){
    					}
    				},'-',{
    					text:'修改密码',
    					iconCls:'icon-save',
    					handler:function(){
    					}
    				}]
        		});
        		$('#dialog').dialog({
					width: 300, 
					height: 350,
					closed: true
				});
        		$('#savebtn').linkbutton({
        			iconCls: "icon-save",
        			width: 60
        		});
        		$('#closebtn').linkbutton({
        			iconCls: "icon-cancel"
        		})
        	})
        </script>
        <style type="text/css">
        	#dialogtb{
        		margin: 0 0 0 20px ;
        	}
        	#dialogtb td{
        		height: 35px;
        		text-align: 'center';
        	}
        	.tdtitle{
        		width: 50px;
        	}
        	.tdvalue{
        		width: 150px;
        	}
        	.tdbutton{
        		float: left;
        		width: 80px;
        		margin: 0 -40px 0 55px;
        	}
        </style>
    </head>
	<body>
		<table id="usergrid"></table>
		<div id="dialog">
			<table id="dialogtb">
				<tr>
					<td class="tdtitle">用 户 名：</td>
					<td class="tdvalue"><input type="text" id="account" /></td>
				</tr>
				<tr>
					<td>密&nbsp;&nbsp;码：</td>
					<td><input type="password" id="password" /></td>
				</tr>
				<tr>
					<td>姓&nbsp;&nbsp;名：</td>
					<td><input type="text" id="name" /></td>
				</tr>
				<tr>
					<td>性&nbsp;&nbsp;别：</td>
					<td>
						<select id="sex">
							<option value="1">男</option>
							<option value="0">女</option>
						</select>
					</td>
				</tr>
				<tr>
					<td>工作单位：</td>
					<td>
						<select id="depart">
						</select> 
					</td>
				</tr>
				<tr>
					<td>用户类别：</td>
					<td>
						<select id="level">
						</select> 
					</td>
				</tr>
				<tr>
					<td>用户角色：</td>
					<td>
						<select id="role">
						</select> 
					</td>
				</tr>
			</table>
			<div>
				<div class="tdbutton"><a id="savebtn">保存</a></div>
				<div class="tdbutton"><a id="closebtn">关闭</a></div>
			</div>
		</div>
	</body>
</html>